package ch07_GUI编程;

import javax.swing.*;
import java.awt.*;

public class ImageWindowDemo {
	public static void main(String[] args) {
		BaseFrame f=new BaseFrame("Test");
		ImageIcon image = new ImageIcon("images/14.png");
		JLabel labs = new JLabel(image);
		labs.setSize(image.getIconWidth(), image.getIconHeight());
		f.getLayeredPane().add(labs,new Integer(Integer.MIN_VALUE));
		JPanel pan =(JPanel)f.getContentPane();
		pan.setOpaque(false);
		pan.setLayout(new FlowLayout());
		JButton bt = new JButton("测试按钮");
		pan.add(bt);

		f.setSize(image.getIconWidth(),image.getIconHeight());
		f.setLocationRelativeTo(null);
		f.showMe();
	}
}
